import can

# # 尝试不同的通道号
# channel_numbers = ['CAN0', 'CAN1', 'CAN2']  # 根据实际情况添加可能的通道号
#
# for channel in channel_numbers:
#     try:
#         bus = can.interface.Bus(bustype='nican', channel=channel, bitrate=500000)
#         print(f"Successfully connected to channel {channel}")
#         bus.shutdown()  # 关闭总线连接
#     except Exception as e:
#         print(f"Failed to connect to channel {channel}: {e}")

import platform
print(platform.architecture())